<?php exit(0);?>
DROP TABLE IF EXISTS `umiku_access`;

CREATE TABLE `umiku_access` (
  `role_id` int(11) unsigned NOT NULL default '0',
  `menu_id` int(11) unsigned NOT NULL default '0',
  `parentid` int(11) unsigned NOT NULL default '0',
  KEY `groupId` (`role_id`),
  KEY `nodeId` (`menu_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

DROP TABLE IF EXISTS `umiku_activity`;

CREATE TABLE `umiku_activity` (
  `id` int(10) NOT NULL auto_increment,
  `mallid` int(5) NOT NULL,
  `mallname` varchar(50) NOT NULL,
  `name` varchar(50) NOT NULL,
  `pic` varchar(255) NOT NULL,
  `stime` varchar(30) NOT NULL,
  `etime` varchar(30) NOT NULL,
  `url` varchar(255) NOT NULL,
  `des` varchar(500) NOT NULL,
  `content` text NOT NULL,
  `sort` int(10) NOT NULL,
  `recommend` int(1) NOT NULL default '0',
  `time` varchar(30) NOT NULL,
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

DROP TABLE IF EXISTS `umiku_ad`;

CREATE TABLE `umiku_ad` (
  `Id` int(11) NOT NULL auto_increment,
  `content` varchar(5000) default NULL,
  `adtype` varchar(255) default NULL,
  `addtime` varchar(255) default NULL,
  PRIMARY KEY  (`Id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

DROP TABLE IF EXISTS `umiku_adminlog`;

CREATE TABLE `umiku_adminlog` (
  `id` int(11) NOT NULL auto_increment,
  `admin_name` varchar(50) NOT NULL,
  `ip` varchar(15) NOT NULL,
  `act_name` varchar(50) NOT NULL,
  `time` int(15) NOT NULL,
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

DROP TABLE IF EXISTS `umiku_apilogin`;

CREATE TABLE `umiku_apilogin` (
  `dduserid` int(11) NOT NULL,
  `ortheruserid` varchar(50) NOT NULL,
  `ortherusername` varchar(50) NOT NULL,
  `ortherwebname` varchar(20) NOT NULL,
  `time` varchar(30) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

DROP TABLE IF EXISTS `umiku_apireg`;

CREATE TABLE `umiku_apireg` (
  `id` int(11) NOT NULL auto_increment,
  `taoappKey` varchar(50) default NULL,
  `taoappSecret` varchar(50) default NULL,
  `qqappKey` varchar(50) default NULL,
  `qqappSecret` varchar(50) default NULL,
  `qqlappKey` varchar(50) default NULL,
  `qqlappSecret` varchar(50) default NULL,
  `sinaappKey` varchar(50) default NULL,
  `sinaappSecret` varchar(50) default NULL,
  `alipayappKey` varchar(50) default NULL,
  `alipayappSecret` varchar(50) default NULL,
  `taoappon` int(1) default '0',
  `qqappon` int(1) default '0',
  `qqlappon` int(1) default '0',
  `sinaappon` int(1) default '0',
  `alipayappon` int(1) default '0',
  `apireg` int(1) default '0',
  `kaixinappKey` varchar(50) default NULL,
  `kaixinappSecret` varchar(100) default NULL,
  `kaixinappon` int(1) NOT NULL default '0',
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

DROP TABLE IF EXISTS `umiku_article`;

CREATE TABLE `umiku_article` (
  `id` int(11) NOT NULL auto_increment,
  `cid` int(11) default NULL,
  `title` varchar(200) default '',
  `subtitle` varchar(200) default '',
  `att` set('a','b','c','d','e','f','g') default '',
  `pic` varchar(200) default NULL,
  `source` varchar(200) default NULL,
  `author` varchar(20) default NULL,
  `resume` varchar(500) default NULL,
  `pubdate` varchar(40) default '',
  `content` text,
  `hits` int(11) default '0',
  `created_by` int(11) default NULL,
  `created_date` datetime default NULL,
  `delete_session_id` int(11) default NULL,
  `ontop` int(11) default '0',
  `hot` int(11) default '0',
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

DROP TABLE IF EXISTS `umiku_category`;

CREATE TABLE `umiku_category` (
  `id` int(11) NOT NULL auto_increment,
  `pid` int(11) default '0',
  `name` varchar(50) default '',
  `description` text,
  `seq` int(11) default '0',
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

DROP TABLE IF EXISTS `umiku_catelist`;

CREATE TABLE `umiku_catelist` (
  `id` int(2) NOT NULL auto_increment,
  `catename` varchar(32) NOT NULL,
  `sortorder` int(5) NOT NULL default '0',
  `keywords` text,
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

DROP TABLE IF EXISTS `umiku_city`;

CREATE TABLE `umiku_city` (
  `cityid` int(11) NOT NULL auto_increment,
  `cityname` varchar(32) NOT NULL,
  `sortorder` int(5) NOT NULL default '0',
  `pinyin` varchar(32) NOT NULL default '',
  `first_word` varchar(1) NOT NULL,
  `isshow` int(1) NOT NULL default '0',
  PRIMARY KEY  (`cityid`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

DROP TABLE IF EXISTS `umiku_dhdingdan`;

CREATE TABLE `umiku_dhdingdan` (
  `id` int(11) NOT NULL auto_increment,
  `name` varchar(100) default NULL,
  `ddusername` varchar(50) default NULL COMMENT '会员名',
  `dduserid` int(11) NOT NULL,
  `ip` varchar(20) default NULL COMMENT 'IP记录',
  `spid` varchar(18) default NULL COMMENT '商品ID',
  `spend` varchar(10) NOT NULL,
  `tbusername` varchar(10) NOT NULL COMMENT '姓名',
  `address` varchar(100) NOT NULL,
  `email` varchar(50) default NULL,
  `mobile` varchar(200) default NULL,
  `qq` varchar(20) default NULL,
  `remarks` text,
  `addtime` varchar(20) NOT NULL,
  `shoptime` varchar(20) default NULL,
  `status` int(1) NOT NULL default '0',
  `fangshi` varchar(10) NOT NULL,
  `return_msg` varchar(500) default NULL,
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

DROP TABLE IF EXISTS `umiku_dhlist`;

CREATE TABLE `umiku_dhlist` (
  `id` int(11) NOT NULL auto_increment,
  `pic` varchar(255) default NULL,
  `jifen` int(50) default NULL,
  `money` varchar(6) NOT NULL,
  `name` varchar(100) default NULL,
  `hide` int(11) default '0',
  `addtime` datetime default NULL,
  `sort` int(10) default '0',
  `recommend` int(1) default '0',
  `content` text,
  `num` int(5) NOT NULL default '1',
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

DROP TABLE IF EXISTS `umiku_duoduo2010`;

CREATE TABLE `umiku_duoduo2010` (
  `Id` int(11) NOT NULL auto_increment,
  `adminname` varchar(255) default NULL,
  `adminpass` varchar(255) default NULL,
  `lastlogintime` datetime default NULL,
  `lastloginip` varchar(255) default NULL,
  `loginnum` int(11) default '0',
  `logintime` datetime default NULL,
  `loginip` varchar(255) default NULL,
  `regtime` datetime default NULL,
  `role_id` tinyint(2) default NULL,
  PRIMARY KEY  (`Id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

DROP TABLE IF EXISTS `umiku_file`;

CREATE TABLE `umiku_file` (
  `id` int(11) NOT NULL auto_increment,
  `path` varchar(255) default NULL,
  `size` varchar(255) default NULL,
  `upload_date` varchar(255) default NULL,
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

DROP TABLE IF EXISTS `umiku_mall`;

CREATE TABLE `umiku_mall` (
  `id` int(11) NOT NULL auto_increment,
  `name` varchar(20) default NULL,
  `merchant` varchar(20) default NULL,
  `url` varchar(255) default NULL,
  `logo` varchar(255) default NULL,
  `catid` int(2) default NULL,
  `fan` varchar(50) default NULL,
  `hdfk` varchar(10) default NULL,
  `zgfp` varchar(10) default NULL,
  `yfzc` varchar(30) default NULL,
  `ding` int(10) default '0',
  `cai` int(10) default '0',
  `des` varchar(255) default '暂无',
  `js` text,
  `time` varchar(30) default NULL,
  `sort` int(11) default '255',
  `yilink` varchar(255) default NULL,
  `lm` varchar(20) default 'linktech',
  `end_time` date NOT NULL default '2050-01-01',
  `renzheng` varchar(3) NOT NULL,
  `api_url` varchar(255) default NULL,
  `api_rule` varchar(50) default NULL,
  `api_city` varchar(255) default NULL,
  `duomaiid` int(11) NOT NULL default '0',
  `yiqifaid` int(11) NOT NULL default '0',
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

DROP TABLE IF EXISTS `umiku_mall_comment`;

CREATE TABLE `umiku_mall_comment` (
  `id` int(11) NOT NULL auto_increment,
  `mall_name` varchar(50) default NULL,
  `mall_id` int(11) NOT NULL,
  `user_name` varchar(50) default NULL,
  `user_id` int(11) NOT NULL,
  `fen` int(1) default NULL,
  `comment` text,
  `time` varchar(20) default NULL,
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

DROP TABLE IF EXISTS `umiku_mall_order`;

CREATE TABLE `umiku_mall_order` (
  `id` int(11) NOT NULL auto_increment,
  `order_time` varchar(20) default NULL,
  `merchant_id` varchar(20) default NULL,
  `u_id` int(11) default '0',
  `ddusername` varchar(50) default NULL,
  `order_code` varchar(50) default NULL,
  `item_count` int(5) default NULL,
  `item_price` varchar(10) default NULL,
  `sales` varchar(20) default NULL,
  `commission` varchar(10) default NULL,
  `fxje` varchar(10) default NULL,
  `bill_yyyymmdd` varchar(20) default '0',
  `stat_desc` varchar(10) default NULL,
  `prod_id` varchar(255) default NULL,
  `qrsj` varchar(255) default NULL,
  `product_code` varchar(50) default NULL,
  `lm` varchar(50) default 'linktech',
  `unique_id` varchar(50) default NULL,
  `adid` int(11) NOT NULL default '0',
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

DROP TABLE IF EXISTS `umiku_malltype`;

CREATE TABLE `umiku_malltype` (
  `id` int(11) NOT NULL auto_increment,
  `typename` varchar(200) default '',
  `typecode` varchar(200) default '',
  `sort` int(11) default '0',
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

DROP TABLE IF EXISTS `umiku_menu`;

CREATE TABLE `umiku_menu` (
  `id` smallint(6) unsigned NOT NULL auto_increment,
  `parentid` smallint(6) unsigned NOT NULL default '0',
  `status` tinyint(1) unsigned NOT NULL default '0',
  `name` varchar(50) NOT NULL default '',
  `url` varchar(255) NOT NULL default '',
  `listorder` int(11) NOT NULL,
  PRIMARY KEY  (`id`),
  KEY `status` (`status`),
  KEY `parentid` (`parentid`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

DROP TABLE IF EXISTS `umiku_mingxi`;

CREATE TABLE `umiku_mingxi` (
  `Id` int(11) NOT NULL auto_increment,
  `ddusername` varchar(255) default NULL,
  `shijian` varchar(255) default NULL,
  `je` double default '0',
  `jifen` int(5) NOT NULL default '0',
  `addtime` datetime default NULL,
  `memo` varchar(500) default NULL,
  `leave_money` double(10,2) default '0.00',
  PRIMARY KEY  (`Id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

DROP TABLE IF EXISTS `umiku_msg`;

CREATE TABLE `umiku_msg` (
  `Id` int(11) NOT NULL auto_increment,
  `title` varchar(500) default NULL,
  `content` varchar(6000) default NULL,
  `addtime` datetime default NULL,
  `see` int(11) default '0',
  `ddusername` varchar(255) default NULL,
  `senduser` varchar(255) default NULL,
  PRIMARY KEY  (`Id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

DROP TABLE IF EXISTS `umiku_msgset`;

CREATE TABLE `umiku_msgset` (
  `Id` int(11) NOT NULL auto_increment,
  `msg` varchar(2000) default NULL,
  `type` varchar(255) default NULL,
  PRIMARY KEY  (`Id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

DROP TABLE IF EXISTS `umiku_nav`;

CREATE TABLE `umiku_nav` (
  `id` int(5) NOT NULL auto_increment,
  `name` varchar(20) collate utf8_bin NOT NULL,
  `link` varchar(500) collate utf8_bin NOT NULL,
  `sort` int(5) NOT NULL default '0',
  `hide` tinyint(1) NOT NULL default '0',
  `auto` tinyint(1) NOT NULL default '0',
  `target` tinyint(1) NOT NULL default '0',
  `tag` varchar(10) collate utf8_bin NOT NULL,
  `other` varchar(255) collate utf8_bin default NULL,
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

DROP TABLE IF EXISTS `umiku_noword`;

CREATE TABLE `umiku_noword` (
  `id` int(11) NOT NULL auto_increment,
  `word` varchar(255) NOT NULL,
  PRIMARY KEY  (`id`),
  UNIQUE KEY `word` (`word`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

DROP TABLE IF EXISTS `umiku_role`;

CREATE TABLE `umiku_role` (
  `id` smallint(6) unsigned NOT NULL auto_increment,
  `name` varchar(20) NOT NULL default '',
  `status` tinyint(1) unsigned NOT NULL default '0',
  PRIMARY KEY  (`id`),
  KEY `status` (`status`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

DROP TABLE IF EXISTS `umiku_seo`;

CREATE TABLE `umiku_seo` (
  `id` int(11) NOT NULL auto_increment,
  `tag` varchar(255) default NULL,
  `url` varchar(255) default NULL,
  `title` varchar(255) default NULL,
  `keyword` varchar(255) default NULL,
  `desc` varchar(255) default NULL,
  `label` text,
  `del` tinyint(4) default '0',
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

DROP TABLE IF EXISTS `umiku_service`;

CREATE TABLE `umiku_service` (
  `id` int(5) NOT NULL auto_increment,
  `name` varchar(50) NOT NULL,
  `code` varchar(50) NOT NULL,
  `type` tinyint(1) NOT NULL,
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

DROP TABLE IF EXISTS `umiku_setting`;

CREATE TABLE `umiku_setting` (
  `id` int(11) NOT NULL auto_increment,
  `var` varchar(50) NOT NULL,
  `val` varchar(255) NOT NULL,
  `constant` int(1) NOT NULL default '1',
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

DROP TABLE IF EXISTS `umiku_shai`;

CREATE TABLE `umiku_shai` (
  `id` int(11) NOT NULL auto_increment,
  `ddusername` varchar(50) NOT NULL,
  `dduserid` int(11) NOT NULL,
  `tao_id` bigint(12) NOT NULL,
  `trade_id` int(11) NOT NULL default '0',
  `image` varchar(255) character set utf8 collate utf8_bin default NULL,
  `title` varchar(100) default NULL,
  `price` double(10,2) NOT NULL default '0.00',
  `fxje` double(10,2) NOT NULL default '0.00',
  `jifen` int(10) NOT NULL default '0',
  `catid` int(2) NOT NULL default '1',
  `isfan` int(1) NOT NULL default '0',
  `url` varchar(255) character set utf8 collate utf8_bin default NULL,
  `click_url` varchar(255) character set utf8 collate utf8_bin default NULL,
  `keywords` varchar(100) default NULL,
  `comment` varchar(500) default NULL,
  `xs` char(5) character set utf8 collate utf8_bin NOT NULL default 'shai',
  `hart` int(10) NOT NULL default '0',
  `hits` int(11) NOT NULL default '0',
  `time` int(15) NOT NULL,
  `sort` int(11) NOT NULL default '0',
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

DROP TABLE IF EXISTS `umiku_shai_blacklist`;

CREATE TABLE `umiku_shai_blacklist` (
  `tao_id` bigint(12) NOT NULL,
  `time` bigint(15) NOT NULL,
  PRIMARY KEY  (`tao_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

DROP TABLE IF EXISTS `umiku_shai_comment`;

CREATE TABLE `umiku_shai_comment` (
  `id` int(10) NOT NULL auto_increment,
  `shai_id` int(11) NOT NULL,
  `xs` char(5) character set utf8 collate utf8_bin NOT NULL default 'shai',
  `comment` varchar(140) NOT NULL,
  `time` int(15) NOT NULL,
  `dduserid` int(11) NOT NULL,
  `ddusername` varchar(50) character set utf8 collate utf8_bin NOT NULL,
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

DROP TABLE IF EXISTS `umiku_shai_hart`;

CREATE TABLE `umiku_shai_hart` (
  `id` int(10) NOT NULL auto_increment,
  `shai_id` int(11) NOT NULL,
  `xs` char(5) character set utf8 collate utf8_bin NOT NULL default 'shai',
  `time` int(15) NOT NULL,
  `dduserid` int(11) NOT NULL,
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

DROP TABLE IF EXISTS `umiku_shop`;

CREATE TABLE `umiku_shop` (
  `Id` int(11) NOT NULL auto_increment,
  `nick` varchar(255) default NULL,
  `uid` varchar(255) default NULL,
  `cid` int(10) default NULL,
  `consumer_protection` varchar(10) default NULL,
  `level` int(10) default NULL,
  `score` int(11) default NULL,
  `total_num` int(11) default NULL,
  `good_num` int(11) default NULL,
  `city` varchar(255) default NULL,
  `state` varchar(255) default NULL,
  `sid` varchar(255) default NULL,
  `title` varchar(255) default NULL,
  `pic_path` varchar(255) default NULL,
  `created` varchar(255) default NULL,
  `shop_click_url` varchar(300) default NULL,
  `type` varchar(5) default 'C',
  `addtime` varchar(255) default '2007-05-23',
  `hits` int(11) default '0',
  `tuijian` int(11) default '0',
  `item_score` varchar(255) default '4.8',
  `service_score` varchar(255) default '4.8',
  `delivery_score` varchar(255) default '4.8',
  `fanxianlv` varchar(255) default NULL,
  `good` varchar(255) default NULL,
  PRIMARY KEY  (`Id`),
  UNIQUE KEY `nick` (`nick`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

DROP TABLE IF EXISTS `umiku_slides`;

CREATE TABLE `umiku_slides` (
  `id` int(11) NOT NULL auto_increment,
  `pic` varchar(255) default NULL,
  `url` varchar(255) default NULL,
  `title` varchar(100) default NULL,
  `hide` int(11) default '0',
  `addtime` datetime default NULL,
  `wz` int(11) default '10000',
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

DROP TABLE IF EXISTS `umiku_taobaoset`;

CREATE TABLE `umiku_taobaoset` (
  `Id` int(11) NOT NULL auto_increment,
  `appKey` varchar(255) default NULL,
  `appSecret` varchar(255) default NULL,
  `appkey2` varchar(255) default NULL,
  `appsecret2` varchar(255) default NULL,
  `appkey3` varchar(255) default NULL,
  `appsecret3` varchar(255) default NULL,
  `appkey4` varchar(255) default NULL,
  `appsecret4` varchar(255) default NULL,
  `appkey5` varchar(255) default NULL,
  `appsecret5` varchar(255) default NULL,
  `userpid` varchar(255) default NULL,
  `usernick` varchar(255) default NULL,
  `seckey` varchar(255) default NULL,
  `appnum` int(5) default '200',
  `appnum2` int(5) default '0',
  `appnum3` int(5) default '0',
  `appnum4` int(5) default '0',
  `appnum5` int(5) default '0',
  `sessionkey` varchar(100) default NULL,
  `sessiontime` varchar(20) default NULL,
  `getkey` varchar(20) default NULL,
  `chkey` int(20) default '1',
  PRIMARY KEY  (`Id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

DROP TABLE IF EXISTS `umiku_tempdata`;

CREATE TABLE `umiku_tempdata` (
  `id` int(11) NOT NULL auto_increment,
  `commission` double(10,2) NOT NULL default '0.00' COMMENT '佣金',
  `carry` double(10,2) NOT NULL default '0.00' COMMENT '提现',
  `userfunds` double(10,2) NOT NULL default '0.00' COMMENT '用户资金',
  `userno` int(11) NOT NULL default '0' COMMENT '用户数量',
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

DROP TABLE IF EXISTS `umiku_tixian`;

CREATE TABLE `umiku_tixian` (
  `Id` int(11) NOT NULL auto_increment,
  `ddusername` varchar(255) default NULL,
  `txje` double default NULL,
  `zfb` varchar(255) default NULL,
  `addtime` datetime default NULL,
  `addip` varchar(255) default NULL,
  `txstate` int(11) default '0',
  `realname` varchar(255) default NULL,
  `mobile` varchar(255) default NULL,
  `why` varchar(500) default NULL,
  PRIMARY KEY  (`Id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

DROP TABLE IF EXISTS `umiku_tradelist`;

CREATE TABLE `umiku_tradelist` (
  `Id` int(11) NOT NULL auto_increment,
  `pay_time` datetime default NULL,
  `item_title` varchar(255) default NULL,
  `shop_title` varchar(255) default NULL,
  `num_iid` varchar(255) default NULL,
  `seller_nick` varchar(255) default NULL,
  `pay_price` varchar(255) default NULL,
  `commission_rate` varchar(255) default NULL,
  `commission` varchar(255) default NULL,
  `item_num` varchar(255) default NULL,
  `trade_id` varchar(255) default NULL,
  `outer_code` varchar(255) default NULL,
  `qrsj` datetime default NULL,
  `fxje` double default '0',
  `checked` int(1) default '0',
  `ddjt` varchar(255) default NULL,
  `real_pay_fee` double(10,2) NOT NULL default '0.00',
  PRIMARY KEY  (`Id`),
  UNIQUE KEY `trade_id` (`trade_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

DROP TABLE IF EXISTS `umiku_tuan_goods`;

CREATE TABLE `umiku_tuan_goods` (
  `id` int(11) NOT NULL auto_increment,
  `local` varchar(255) default NULL,
  `mall_id` int(11) NOT NULL default '0',
  `city` varchar(50) default NULL,
  `catname` varchar(50) default NULL,
  `title` varchar(255) default NULL,
  `image` varchar(255) default NULL,
  `startTime` int(50) default NULL,
  `endTime` int(50) default NULL,
  `value` double(10,2) NOT NULL default '0.00',
  `price` double(10,2) NOT NULL default '0.00',
  `rebate` double(10,1) NOT NULL default '0.0',
  `bought` int(10) NOT NULL default '0',
  `addtime` varchar(50) default NULL,
  `editime` varchar(50) default NULL,
  `sort` int(10) NOT NULL default '0',
  `top` int(1) NOT NULL default '0',
  `salt` int(6) NOT NULL default '1',
  `content` text,
  PRIMARY KEY  (`id`),
  KEY `title` (`title`),
  KEY `editime` (`editime`),
  KEY `sort` (`sort`),
  KEY `salt` (`salt`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

DROP TABLE IF EXISTS `umiku_user`;

CREATE TABLE `umiku_user` (
  `Id` int(11) NOT NULL auto_increment,
  `ddusername` varchar(255) default NULL,
  `ddpassword` varchar(255) default NULL,
  `tbusername` varchar(255) default NULL,
  `regtime` datetime default NULL,
  `loginnum` int(11) default '0',
  `lastlogintime` datetime default NULL,
  `lasttixian` datetime default NULL,
  `zfb` varchar(255) default NULL,
  `email` varchar(255) default NULL,
  `money` double(10,2) default '0.00',
  `jifen` int(11) NOT NULL default '0',
  `txstate` int(11) default '0',
  `dhstate` int(1) NOT NULL default '0',
  `dengji` int(11) default '0',
  `tjr` varchar(255) default NULL,
  `mobile` varchar(255) default NULL,
  `qq` varchar(255) default NULL,
  `pass_question` varchar(250) default NULL,
  `pass_answer` varchar(250) default NULL,
  `yitixian` double default '0',
  `fxb` int(1) NOT NULL default '0',
  `jihuo` int(1) NOT NULL default '0',
  `hart` int(10) NOT NULL default '0',
  `regip` varchar(20) default NULL,
  PRIMARY KEY  (`Id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

DROP TABLE IF EXISTS `umiku_websetting`;

CREATE TABLE `umiku_websetting` (
  `Id` int(11) NOT NULL auto_increment,
  `fxbl` double default '0.5',
  `fxbl2` double default '0.6',
  `fxbl3` double default '0.7',
  `fxbl4` double default '0.8',
  `mallfxbl1` double default '0.5',
  `mallfxbl2` double default '0.6',
  `mallfxbl3` double default '0.7',
  `mallfxbl4` double default '0.8',
  `tgbl` double default '0.1',
  `webtitle` varchar(250) default NULL,
  `webdesc` varchar(250) default NULL,
  `keyword` text,
  `description` text,
  `url` varchar(100) default NULL,
  `surl` varchar(100) default NULL,
  `email` varchar(100) default NULL,
  `icp` varchar(100) default NULL,
  `tongji` text,
  `qq` varchar(50) default NULL,
  `webnick` varchar(100) default NULL,
  `emsg` text,
  `gonggao` longtext,
  `renzheng` text,
  `tixianje` double default '10',
  `txxz` double default '0',
  `zhucesong` double default '0',
  `zhucesonglevel` int(11) default '0',
  `liebiao` varchar(10) default '0',
  `wjt` varchar(10) default '0',
  `moresort` varchar(100) default 'commissionNum_desc',
  `moban` varchar(50) default 'default',
  `hcopen` varchar(10) default '0',
  `hctime` varchar(10) default '10',
  `dengji1` int(11) default '20',
  `dengji2` int(11) default '50',
  `dengji3` int(11) default '100',
  `shopcj` int(11) default '1',
  `shopcj_s` int(11) default '11',
  `shopcj_e` int(11) default '20',
  `pagesize` varchar(10) default '20',
  `smtp_host` varchar(100) default NULL,
  `smtp_user` varchar(100) default NULL,
  `smtp_pw` varchar(100) default NULL,
  `smtp_open` varchar(10) default 'off',
  `fxbname` varchar(100) default '返现宝',
  `hotword` varchar(100) default '热卖',
  `webclose` int(11) default '0',
  `webclosemsg` text,
  `webtype` int(11) default '1',
  `cha` int(11) default '0',
  `apijk` int(11) default '0',
  `apisize` int(11) default '50',
  `mallzh` varchar(100) default NULL,
  `mallmm` varchar(100) default NULL,
  `mallwzbh` varchar(100) default NULL,
  `uc` int(11) default '0',
  `gettime` varchar(20) default '0',
  `miyue` varchar(50) default NULL,
  `fxb_open` int(1) NOT NULL default '0',
  `jifen_open` tinyint(1) NOT NULL default '0',
  `jifenbl` double(5,2) NOT NULL default '0.00',
  `zsjifen` varchar(5) NOT NULL default '0',
  `spider` varchar(255) default NULL,
  `ban_spider_open` int(1) default '0',
  `tao_pj_open` int(1) default '0',
  `tgopen` int(1) default '0',
  `yisid` varchar(20) default NULL,
  `yiwid` varchar(20) default NULL,
  `yiname` varchar(50) default NULL,
  `tgurl` varchar(255) default NULL,
  `serviceopen` tinyint(1) default '0',
  `reg_send_email` tinyint(1) default '0',
  `tixian_send_email` tinyint(1) default '0',
  `sign_open` tinyint(1) default '0',
  `sign_money` double(5,2) default '0.00',
  `sign_jifen` tinyint(10) default '0',
  `email_jihuo` tinyint(1) default '0',
  `urlkey` varchar(255) default NULL,
  `hytxjl` double(5,2) NOT NULL default '0.00',
  `picwjt` tinyint(1) NOT NULL default '0',
  `picjm` tinyint(1) NOT NULL default '0',
  `duomaimiyue` varchar(50) default NULL,
  `duomaiid` int(11) NOT NULL default '0',
  `duomaiwid` int(11) NOT NULL default '0',
  `duomaiwbh` varchar(10) NOT NULL default '001',
  `searchlimit` int(11) NOT NULL default '0',
  `searchs8` int(11) NOT NULL default '0',
  `reg_between` double(6,2) NOT NULL default '0.00',
  PRIMARY KEY  (`Id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

DROP TABLE IF EXISTS `umiku_yqlj`;

CREATE TABLE `umiku_yqlj` (
  `Id` int(11) NOT NULL auto_increment,
  `url` varchar(255) default NULL,
  `webname` varchar(255) default NULL,
  `addtime` datetime default NULL,
  `leibie` int(11) default '0',
  `pic` varchar(255) default '',
  `wz` int(11) default '0',
  PRIMARY KEY  (`Id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

DROP TABLE IF EXISTS `aws_active_tbl`;

CREATE TABLE `aws_active_tbl` (
  `active_id` int(10) unsigned NOT NULL auto_increment,
  `uid` int(11) default '0',
  `expire_time` int(10) default NULL,
  `active_code` varchar(32) default NULL,
  `active_type` tinyint(4) default NULL COMMENT '1 邮件激活, 11 找回密码 1121 邮箱验证 22 手机验证',
  `active_type_code` varchar(16) default NULL,
  `active_values` text,
  `add_time` int(10) default NULL,
  `add_ip` bigint(12) default NULL,
  `active_expire` tinyint(1) default NULL,
  `active_time` int(10) default NULL,
  `active_ip` bigint(12) default NULL,
  PRIMARY KEY  (`active_id`),
  KEY `active_code` (`active_code`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

DROP TABLE IF EXISTS `aws_admin_group`;

CREATE TABLE `aws_admin_group` (
  `group_id` int(11) unsigned NOT NULL auto_increment,
  `group_name` varchar(32) NOT NULL default '' COMMENT '组名',
  `menu` text NOT NULL COMMENT '可见栏目',
  `no_menu` text,
  `permission` text NOT NULL COMMENT '权限',
  `no_permission` text,
  PRIMARY KEY  (`group_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

DROP TABLE IF EXISTS `aws_answer`;

CREATE TABLE `aws_answer` (
  `answer_id` int(11) NOT NULL auto_increment COMMENT '回答id',
  `question_id` int(11) NOT NULL COMMENT '问题id',
  `answer_content` text COMMENT '回答内容',
  `add_time` int(10) default '0' COMMENT '添加时间',
  `modify_time` int(10) default '0',
  `against_count` int(11) NOT NULL default '0' COMMENT '反对人数',
  `agree_count` int(11) NOT NULL default '0' COMMENT '支持人数',
  `uid` int(11) default '0' COMMENT '发布问题用户ID',
  `comment_count` int(11) default '0' COMMENT '评论总数',
  `uninterested_count` int(11) default '0' COMMENT '不感兴趣',
  `thanks_count` int(11) default '0' COMMENT '感谢数量',
  `category_id` int(11) default '0' COMMENT '分类id',
  PRIMARY KEY  (`answer_id`),
  KEY `question_id` (`question_id`),
  KEY `uid` (`uid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='回答';

DROP TABLE IF EXISTS `aws_answer_attach`;

CREATE TABLE `aws_answer_attach` (
  `id` int(11) unsigned NOT NULL auto_increment,
  `file_name` varchar(255) default NULL COMMENT '附件名称',
  `access_key` varchar(32) default NULL COMMENT '批次 Key',
  `add_time` int(10) default '0' COMMENT '上传时间',
  `answer_id` int(11) default '0' COMMENT '问题 ID',
  `file_location` varchar(255) default NULL COMMENT '文件位置',
  `is_image` int(1) default '0',
  PRIMARY KEY  (`id`),
  KEY `answer_id` (`answer_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

DROP TABLE IF EXISTS `aws_answer_comments`;

CREATE TABLE `aws_answer_comments` (
  `id` int(11) unsigned NOT NULL auto_increment,
  `answer_id` int(11) default '0',
  `uid` int(11) default '0',
  `message` varchar(255) default NULL,
  `time` int(10) default '0',
  PRIMARY KEY  (`id`),
  KEY `answer_id` (`answer_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

DROP TABLE IF EXISTS `aws_answer_thanks`;

CREATE TABLE `aws_answer_thanks` (
  `id` int(11) unsigned NOT NULL auto_increment,
  `uid` int(11) default '0',
  `answer_id` int(11) default '0',
  `user_name` varchar(255) default NULL,
  `time` int(10) default '0',
  PRIMARY KEY  (`id`),
  KEY `answer_id` (`answer_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

DROP TABLE IF EXISTS `aws_answer_uninterested`;

CREATE TABLE `aws_answer_uninterested` (
  `id` int(11) unsigned NOT NULL auto_increment,
  `uid` int(11) default '0',
  `answer_id` int(11) default '0',
  `user_name` varchar(255) default NULL,
  `time` int(10) default '0',
  PRIMARY KEY  (`id`),
  KEY `answer_id` (`answer_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

DROP TABLE IF EXISTS `aws_answer_vote`;

CREATE TABLE `aws_answer_vote` (
  `voter_id` int(11) NOT NULL auto_increment COMMENT '自动ID',
  `answer_id` int(11) default NULL COMMENT '答案id',
  `answer_uid` int(11) default NULL COMMENT '答案作者id',
  `vote_uid` int(11) default NULL COMMENT '用户ID',
  `add_time` int(10) default NULL COMMENT '添加时间',
  `vote_value` tinyint(4) NOT NULL COMMENT '-1反对 1 支持',
  `reputation_factor` int(10) default '0',
  PRIMARY KEY  (`voter_id`),
  KEY `answer_id` (`answer_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

DROP TABLE IF EXISTS `aws_area_code`;

CREATE TABLE `aws_area_code` (
  `area_autoid` int(11) NOT NULL auto_increment COMMENT '地区代码自增ID',
  `area_code` int(11) NOT NULL COMMENT '地区代码',
  `area_parentcode` int(11) default '0' COMMENT '父地区代码',
  `area_name` varchar(32) default NULL COMMENT '省市名称',
  `area_zip_code` varchar(12) default NULL COMMENT '邮政编码',
  `area_tel_code` int(11) default '0' COMMENT '电话区号',
  `area_eng_code` varchar(6) default NULL COMMENT '英文代码',
  `area_class_level` int(11) default NULL COMMENT '等级类别',
  PRIMARY KEY  (`area_code`),
  KEY `AK_areacode_autoid` (`area_autoid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='地区代码';

DROP TABLE IF EXISTS `aws_cache`;

CREATE TABLE `aws_cache` (
  `key` varchar(255) NOT NULL default '',
  `data` text,
  `expire` int(10) default NULL,
  PRIMARY KEY  (`key`),
  KEY `expire` (`expire`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

DROP TABLE IF EXISTS `aws_category`;

CREATE TABLE `aws_category` (
  `id` int(11) unsigned NOT NULL auto_increment,
  `title` varchar(128) default NULL,
  `type` varchar(16) default NULL,
  `icon` varchar(255) default NULL,
  `parent_id` int(11) default '0',
  `sort` smallint(6) default '0',
  `description` varchar(255) default NULL,
  PRIMARY KEY  (`id`),
  KEY `parent_id` (`parent_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

DROP TABLE IF EXISTS `aws_draft`;

CREATE TABLE `aws_draft` (
  `id` int(11) unsigned NOT NULL auto_increment,
  `uid` int(11) default '0',
  `type` varchar(16) default NULL,
  `item_id` int(11) default NULL,
  `data` text,
  `time` int(10) default '0',
  PRIMARY KEY  (`id`),
  KEY `uid` (`uid`),
  KEY `item_id` (`item_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

DROP TABLE IF EXISTS `aws_education_experience`;

CREATE TABLE `aws_education_experience` (
  `education_id` int(11) NOT NULL auto_increment,
  `uid` int(11) default NULL COMMENT '用户UID',
  `education_years` int(11) default NULL COMMENT '入学年份',
  `school_code` int(11) default NULL COMMENT '学校代码',
  `departments_code` int(11) default NULL COMMENT '院系代码',
  `educational` tinyint(4) default NULL COMMENT '学历',
  `school_name` varchar(64) default NULL COMMENT '学校名',
  `school_type` tinyint(4) default NULL COMMENT '学校类别',
  `departments` varchar(64) default NULL COMMENT '院系',
  `add_time` int(10) default NULL COMMENT '记录添加时间',
  PRIMARY KEY  (`education_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='教育经历';

DROP TABLE IF EXISTS `aws_invitation`;

CREATE TABLE `aws_invitation` (
  `invitation_id` int(10) unsigned NOT NULL auto_increment COMMENT '激活ID',
  `uid` int(11) default '0' COMMENT '用户ID',
  `invitation_code` varchar(32) default NULL COMMENT '激活码',
  `invitation_email` varchar(255) default NULL COMMENT '激活email',
  `add_time` int(10) default NULL COMMENT '添加时间',
  `add_ip` bigint(12) default NULL COMMENT '添加IP',
  `active_expire` tinyint(1) default '0' COMMENT '激活过期',
  `active_time` int(10) default NULL COMMENT '激活时间',
  `active_ip` bigint(12) default NULL COMMENT '激活IP',
  `active_status` tinyint(4) default '0' COMMENT '1已使用0未使用-1已删除',
  `active_uid` int(11) default NULL,
  PRIMARY KEY  (`invitation_id`),
  KEY `uid` (`uid`),
  KEY `invitation_code` (`invitation_code`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

DROP TABLE IF EXISTS `aws_jobs`;

CREATE TABLE `aws_jobs` (
  `id` int(11) NOT NULL auto_increment,
  `jobs_id` int(11) NOT NULL COMMENT '职位ID',
  `jobs_name` varchar(64) default NULL COMMENT '职位名',
  PRIMARY KEY  (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

DROP TABLE IF EXISTS `aws_login`;

CREATE TABLE `aws_login` (
  `id` int(11) NOT NULL COMMENT '自增ID',
  `uid` int(11) default NULL COMMENT '用户ID',
  `login_time` int(10) default NULL COMMENT '登录时间',
  `login_type` tinyint(4) default NULL COMMENT '登录类型',
  `login_ip` bigint(12) default NULL COMMENT '登录IP',
  `login_rs` tinyint(4) default NULL COMMENT '结果 1成功,-1失败,0,未知',
  PRIMARY KEY  (`id`),
  KEY `uid` (`uid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='登录历史表';

DROP TABLE IF EXISTS `aws_mail_queue`;

CREATE TABLE `aws_mail_queue` (
  `queue_id` int(11) unsigned NOT NULL auto_increment,
  `from_email` varchar(255) NOT NULL default '',
  `to_email` varchar(255) NOT NULL default '',
  `title` varchar(255) NOT NULL,
  `body` text NOT NULL,
  `from_name` varchar(64) default NULL,
  `to_name` varchar(64) default NULL,
  `add_time` int(10) default NULL,
  `send_time` int(10) default NULL,
  `level` tinyint(2) default '0',
  `state` tinyint(4) default '0' COMMENT '0未发送 1已经发送',
  `result` varchar(255) default NULL COMMENT '结果',
  `receive` tinyint(4) default '0',
  PRIMARY KEY  (`queue_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

DROP TABLE IF EXISTS `aws_notice`;

CREATE TABLE `aws_notice` (
  `notice_id` int(11) NOT NULL auto_increment COMMENT '自增ID',
  `sender_uid` int(11) default NULL COMMENT '发送者ID',
  `dialog_id` int(11) default NULL COMMENT '对话id',
  `notice_title` varchar(64) default NULL COMMENT '标题',
  `notice_content` text COMMENT '内容',
  `add_time` int(10) default NULL COMMENT '添加时间',
  `notice_type` tinyint(4) default NULL COMMENT '0-普通消息10-系统发的消息，不能回复11-系统通知',
  PRIMARY KEY  (`notice_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

DROP TABLE IF EXISTS `aws_notice_dialog`;

CREATE TABLE `aws_notice_dialog` (
  `dialog_id` int(11) NOT NULL auto_increment COMMENT '对话ID',
  `sender_uid` int(11) default NULL COMMENT '发送者UID',
  `sender_unread` int(11) default NULL COMMENT '发送者未读',
  `recipient_uid` int(11) default NULL COMMENT '接收者UID',
  `recipient_unread` int(11) default NULL COMMENT '接收者未读',
  `add_time` int(11) default NULL COMMENT '添加时间',
  `last_time` int(11) default NULL COMMENT '最后更新时间',
  `last_notice_id` int(11) default NULL COMMENT '最后短消息ID',
  `sender_count` int(11) default NULL COMMENT '发送者显示对话条数',
  `recipient_count` int(11) default NULL COMMENT '接收者显示对话条数',
  `all_count` int(11) default NULL COMMENT '总对话条数',
  PRIMARY KEY  (`dialog_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

DROP TABLE IF EXISTS `aws_notice_recipient`;

CREATE TABLE `aws_notice_recipient` (
  `recipient_id` int(11) NOT NULL auto_increment COMMENT '自增ID',
  `notice_id` int(11) default NULL COMMENT '短信息ID',
  `dialog_id` int(11) default NULL COMMENT '对话ID，由时间戳生成',
  `sender_uid` int(11) default NULL COMMENT '发送者UID',
  `sender_time` int(11) default NULL COMMENT '发送时间',
  `sender_del` tinyint(4) default NULL COMMENT '发送者删除',
  `recipient_uid` int(11) default NULL COMMENT '接收者UID',
  `recipient_time` int(11) default NULL COMMENT '接收时间',
  `recipient_del` tinyint(4) default NULL COMMENT '接收者删除',
  PRIMARY KEY  (`recipient_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

DROP TABLE IF EXISTS `aws_notification`;

CREATE TABLE `aws_notification` (
  `notification_id` int(11) NOT NULL auto_increment COMMENT '自增ID',
  `sender_uid` int(11) default NULL COMMENT '发送者ID',
  `recipient_uid` int(11) default '0' COMMENT '接收者ID',
  `action_type` int(4) default NULL COMMENT '操作类型',
  `model_type` smallint(11) NOT NULL default '0',
  `source_id` int(11) NOT NULL default '0' COMMENT '问题或比赛ID',
  `data` text COMMENT '附加数据',
  `add_time` int(10) default NULL COMMENT '添加时间',
  `read_flag` int(11) default '0' COMMENT '阅读状态',
  PRIMARY KEY  (`notification_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='系统通知';

DROP TABLE IF EXISTS `aws_question`;

CREATE TABLE `aws_question` (
  `question_id` int(11) NOT NULL auto_increment,
  `question_content` varchar(255) NOT NULL default '' COMMENT '问题内容',
  `question_detail` text COMMENT '问题说明',
  `add_time` int(11) NOT NULL COMMENT '添加时间',
  `modify_time` int(11) default NULL COMMENT '最后修改时间',
  `update_time` int(11) default NULL,
  `published_uid` int(11) default NULL COMMENT '发布用户UID',
  `modify_uid` int(11) default NULL COMMENT '修改用户ID',
  `answer_count` int(11) default NULL COMMENT '回答计数',
  `answer_users` int(11) default '0' COMMENT '回答人数',
  `view_count` int(11) default '0' COMMENT '浏览次数',
  `focus_count` int(11) default '0' COMMENT '关注数',
  `comment_count` int(11) default '0' COMMENT '评论数',
  `last_action` int(4) default NULL COMMENT '最后操作类型',
  `last_uid` int(11) default '0' COMMENT '上一动作用户ID',
  `action_history_id` int(11) default '0' COMMENT '动作的记录表的关连id',
  `category_id` int(11) default '0' COMMENT '分类 ID',
  `agree_count` int(11) default '0' COMMENT '答案赞同数总和',
  `against_count` int(11) default '0' COMMENT '答案反对数总和',
  `best_answer` int(11) default '0' COMMENT '最佳答案 ID',
  PRIMARY KEY  (`question_id`),
  KEY `category_id` (`category_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='问题列表';

DROP TABLE IF EXISTS `aws_question_attach`;

CREATE TABLE `aws_question_attach` (
  `id` int(11) unsigned NOT NULL auto_increment,
  `file_name` varchar(255) default NULL COMMENT '附件名称',
  `access_key` varchar(32) default NULL COMMENT '批次 Key',
  `add_time` int(10) default '0' COMMENT '上传时间',
  `question_id` int(11) default '0' COMMENT '问题 ID',
  `file_location` varchar(255) default NULL COMMENT '文件位置',
  `is_image` int(1) default '0',
  PRIMARY KEY  (`id`),
  KEY `question_id` (`question_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

DROP TABLE IF EXISTS `aws_question_comments`;

CREATE TABLE `aws_question_comments` (
  `id` int(11) unsigned NOT NULL auto_increment,
  `question_id` int(11) default '0',
  `uid` int(11) default '0',
  `message` varchar(255) default NULL,
  `time` int(10) default NULL,
  PRIMARY KEY  (`id`),
  KEY `question_id` (`question_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

DROP TABLE IF EXISTS `aws_question_focus`;

CREATE TABLE `aws_question_focus` (
  `focus_id` int(11) NOT NULL auto_increment COMMENT '自增ID',
  `question_id` int(11) default NULL COMMENT '话题ID',
  `uid` int(11) default NULL COMMENT '用户UID',
  `add_time` int(10) default NULL,
  PRIMARY KEY  (`focus_id`),
  KEY `question_id` (`question_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='问题关注表';

DROP TABLE IF EXISTS `aws_question_invite`;

CREATE TABLE `aws_question_invite` (
  `question_invite_id` int(11) NOT NULL auto_increment COMMENT '自增ID',
  `question_id` int(11) NOT NULL COMMENT '问题ID',
  `sender_uid` int(11) NOT NULL,
  `recipients_uid` int(11) NOT NULL,
  `add_time` int(10) default '0' COMMENT '添加时间',
  `available_time` int(10) default '0' COMMENT '生效时间',
  PRIMARY KEY  (`question_invite_id`),
  KEY `question_id` (`question_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='邀请问答';

DROP TABLE IF EXISTS `aws_question_keyword`;

CREATE TABLE `aws_question_keyword` (
  `auto_id` int(10) NOT NULL auto_increment,
  `question_id` int(10) default NULL,
  `keyword` varchar(20) default NULL,
  `add_time` int(10) default NULL,
  PRIMARY KEY  (`auto_id`),
  UNIQUE KEY `keyword` (`question_id`,`keyword`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

DROP TABLE IF EXISTS `aws_question_uninterested`;

CREATE TABLE `aws_question_uninterested` (
  `interested_id` int(11) NOT NULL auto_increment COMMENT '自增ID',
  `question_id` int(11) default NULL COMMENT '话题ID',
  `uid` int(11) default NULL COMMENT '用户UID',
  `add_time` int(10) default NULL,
  PRIMARY KEY  (`interested_id`),
  KEY `uid` (`uid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='问题不感兴趣表';

DROP TABLE IF EXISTS `aws_reputation_topic`;

CREATE TABLE `aws_reputation_topic` (
  `auto_id` int(11) unsigned NOT NULL auto_increment,
  `uid` int(11) default '0',
  `topic_id` int(11) default '0' COMMENT '话题ID',
  `topic_count` int(10) default '0' COMMENT '威望问题话题计数',
  `update_time` int(10) default NULL COMMENT '更新时间',
  PRIMARY KEY  (`auto_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

DROP TABLE IF EXISTS `aws_school`;

CREATE TABLE `aws_school` (
  `school_id` int(11) NOT NULL COMMENT '自增ID',
  `school_type` tinyint(4) default NULL COMMENT '学校类型ID',
  `school_code` int(11) default NULL COMMENT '学校编码',
  `school_name` varchar(64) default NULL COMMENT '学校名称',
  `area_code` int(11) default NULL COMMENT '地区代码',
  PRIMARY KEY  (`school_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='学校';

DROP TABLE IF EXISTS `aws_system_setting`;

CREATE TABLE `aws_system_setting` (
  `id` int(11) NOT NULL auto_increment COMMENT 'id',
  `varname` varchar(32) NOT NULL default '' COMMENT '字段类型',
  `value` text COMMENT '变量值',
  PRIMARY KEY  (`id`),
  UNIQUE KEY `varname` (`varname`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='系统设置';

DROP TABLE IF EXISTS `aws_topic`;

CREATE TABLE `aws_topic` (
  `topic_id` int(11) NOT NULL auto_increment COMMENT '话题id',
  `topic_title` varchar(64) default NULL COMMENT '话题标题',
  `add_time` int(10) default NULL COMMENT '添加时间',
  `add_uid` int(11) default NULL COMMENT '添加的用户ID',
  `topic_count` int(11) default '0' COMMENT '讨论计数',
  `topic_description` text COMMENT '话题描述',
  `topic_pic` varchar(255) default NULL COMMENT '话题图片',
  `topic_lock` tinyint(2) NOT NULL default '0' COMMENT '话题是否锁定 1 锁定 0 未锁定',
  `topic_top` tinyint(4) NOT NULL default '0' COMMENT '是否推荐到首页',
  `focus_count` int(11) default '0' COMMENT '关注计数',
  `is_top` tinyint(2) NOT NULL default '0' COMMENT '是否为顶级话题',
  `parent_id` int(10) default NULL COMMENT '父话题ID',
  PRIMARY KEY  (`topic_id`),
  UNIQUE KEY `topic_title` (`topic_title`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='话题';

DROP TABLE IF EXISTS `aws_topic_experience`;

CREATE TABLE `aws_topic_experience` (
  `experience_id` int(11) NOT NULL auto_increment COMMENT '话题经验ID',
  `topic_id` int(11) NOT NULL COMMENT '话题ID',
  `uid` int(11) NOT NULL COMMENT '所属用户',
  `experience_content` varchar(255) NOT NULL default '' COMMENT '经验内容',
  `add_time` int(10) NOT NULL COMMENT '增加时间',
  PRIMARY KEY  (`experience_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='用户话题经验表';

DROP TABLE IF EXISTS `aws_topic_focus`;

CREATE TABLE `aws_topic_focus` (
  `focus_id` int(11) NOT NULL auto_increment COMMENT '自增ID',
  `topic_id` int(11) default NULL COMMENT '话题ID',
  `uid` int(11) default NULL COMMENT '用户UID',
  `add_time` int(10) default NULL COMMENT '添加时间',
  PRIMARY KEY  (`focus_id`),
  KEY `uid` (`uid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='话题关注表';

DROP TABLE IF EXISTS `aws_topic_question`;

CREATE TABLE `aws_topic_question` (
  `topic_question_id` int(11) NOT NULL auto_increment COMMENT '自增ID',
  `topic_id` int(11) default '0' COMMENT '话题id',
  `question_id` int(11) default '0' COMMENT '问题ID',
  `add_time` int(10) default '0' COMMENT '添加时间',
  `uid` int(11) default '0' COMMENT '用户ID',
  PRIMARY KEY  (`topic_question_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

DROP TABLE IF EXISTS `aws_topic_tree`;

CREATE TABLE `aws_topic_tree` (
  `topic_id` int(11) NOT NULL COMMENT '话题 ID',
  `topic_child_id` int(11) NOT NULL COMMENT '父类话题 ID'
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='话题关联表';

DROP TABLE IF EXISTS `aws_topic_uninterested`;

CREATE TABLE `aws_topic_uninterested` (
  `interested_id` int(11) NOT NULL auto_increment COMMENT '自增ID',
  `topic_id` int(11) default NULL COMMENT '用户ID',
  `uid` int(11) default NULL COMMENT '用户UID',
  `add_time` int(10) default NULL COMMENT '添加时间',
  PRIMARY KEY  (`interested_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='话题不感兴趣表';

DROP TABLE IF EXISTS `aws_user_action_history`;

CREATE TABLE `aws_user_action_history` (
  `history_id` int(11) NOT NULL auto_increment COMMENT '自增ID',
  `uid` int(11) NOT NULL COMMENT '用户id',
  `associate_type` int(4) default NULL COMMENT '关联类型 1 问题 2回答 3评论 4话题 5比赛 6 作品',
  `associate_action` int(4) default NULL COMMENT '操作类型',
  `associate_id` int(11) default NULL COMMENT '关联ID',
  `associate_content` text COMMENT '附加内容',
  `associate_attached` text COMMENT '附加数据',
  `add_time` int(10) default NULL COMMENT '添加时间',
  PRIMARY KEY  (`history_id`),
  KEY `associate_type` (`associate_type`,`associate_action`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='用户操作记录';

DROP TABLE IF EXISTS `aws_user_associate_index`;

CREATE TABLE `aws_user_associate_index` (
  `associate_index_id` int(10) unsigned NOT NULL auto_increment COMMENT '自增 ID',
  `uid` int(10) default '0' COMMENT '用户ID',
  `associate_id` int(10) default '0' COMMENT '关联ID',
  `associate_type` tinyint(2) default '0' COMMENT '1 关注问题  3 发起的问题 ',
  `add_time` int(10) default '0' COMMENT '添加时间',
  `update_time` int(10) default '0' COMMENT '关联表最后动作更新时间',
  PRIMARY KEY  (`associate_index_id`),
  KEY `uid` (`uid`),
  KEY `associate_type` (`associate_type`),
  KEY `update_time` (`update_time`),
  KEY `associate_id` (`associate_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

DROP TABLE IF EXISTS `aws_user_follow`;

CREATE TABLE `aws_user_follow` (
  `follow_id` int(11) unsigned NOT NULL auto_increment COMMENT '自增ID',
  `fans_uid` int(11) default NULL COMMENT '关注人的UID',
  `friend_uid` int(11) default NULL COMMENT '被关注人的uid',
  `add_time` int(10) default NULL COMMENT '添加时间',
  PRIMARY KEY  (`follow_id`),
  KEY `fans_uid` (`fans_uid`),
  KEY `friend_uid` (`friend_uid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='用户关注表';

DROP TABLE IF EXISTS `aws_user_uninterested`;

CREATE TABLE `aws_user_uninterested` (
  `interested_id` int(11) NOT NULL auto_increment COMMENT '自增ID',
  `user_id` int(11) default NULL COMMENT '用户ID',
  `uid` int(11) default NULL COMMENT '用户UID',
  `add_time` int(11) default NULL COMMENT '添加时间',
  PRIMARY KEY  (`interested_id`),
  KEY `user_id` (`user_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='用户不感兴趣表';

DROP TABLE IF EXISTS `aws_users`;

CREATE TABLE `aws_users` (
  `uid` int(11) unsigned NOT NULL auto_increment COMMENT '用户的 UID',
  `user_name` varchar(50) default NULL COMMENT '用户名',
  `email` varchar(50) default NULL COMMENT 'EMAIL',
  `mobile` varchar(50) default NULL COMMENT '用户手机',
  `telephone` varchar(50) default NULL COMMENT '市话',
  `real_name` varchar(50) default NULL COMMENT '真实姓名',
  `password` varchar(50) default NULL COMMENT '用户密码',
  `salt` varchar(50) default NULL COMMENT '用户附加混淆码',
  `user_status` tinyint(4) default NULL COMMENT '用户状态 0未激活 1激活',
  `avatar_file` varchar(50) default NULL COMMENT '头像文件',
  `sex` tinyint(4) default NULL COMMENT '性别',
  `birthday` int(11) default NULL COMMENT '用户生日',
  `country` int(11) default NULL COMMENT '国家ID',
  `province` int(11) default NULL COMMENT '省ID',
  `city` int(11) default NULL COMMENT '市ID',
  `district` int(11) unsigned default NULL COMMENT '区ID',
  `job_id` int(11) default '0' COMMENT '职业ID',
  `reg_time` int(11) default NULL COMMENT '注册时间',
  `reg_ip` bigint(12) default NULL COMMENT '注册IP',
  `user_type` int(4) default NULL COMMENT '用户类型 201 新浪',
  `referer_type` tinyint(4) default NULL COMMENT '注册来源类别',
  `referer_url` varchar(100) default NULL COMMENT '来源 URL',
  `last_login` int(10) default '0' COMMENT '最后登录时间',
  `last_ip` bigint(12) default NULL COMMENT '最后登录 IP',
  `online_time` int(11) default '0' COMMENT '在线时间 (分钟)',
  `last_update` int(10) default '0' COMMENT '资料最后修改时间',
  `notification_unread` int(11) NOT NULL default '0' COMMENT '未读系统通知',
  `notice_unread` int(11) NOT NULL default '0' COMMENT '未读短信息',
  `inbox_recv` tinyint(4) NOT NULL default '0' COMMENT '0-所有人可以发给我,1-我关注的人',
  `fans_count` int(10) NOT NULL default '0' COMMENT '粉丝数',
  `friend_count` int(10) NOT NULL default '0' COMMENT '观众数',
  `invite_count` int(11) NOT NULL default '0' COMMENT '问我数量',
  `question_count` int(11) NOT NULL default '0' COMMENT '问题总数',
  `answer_count` int(11) NOT NULL default '0' COMMENT '回答问题数量',
  `edit_count` int(11) NOT NULL default '0' COMMENT '编辑过的数量',
  `topic_count` int(11) NOT NULL default '0' COMMENT '话题数量',
  `topic_focus_count` int(11) NOT NULL default '0' COMMENT '话题关注数量',
  `invitation_available` int(11) NOT NULL default '0' COMMENT '邀请名额',
  `group_id` smallint(5) default '0' COMMENT '用户组',
  `reputation_group` tinyint(3) default '0' COMMENT '威望对应组',
  `ext_group_ids` varchar(20) default NULL COMMENT '附加用户组,多个用逗号分隔(,注册用户添加好友31)',
  `forbidden` tinyint(3) default '0' COMMENT '是否禁止用户',
  `valid_email` tinyint(2) default '0' COMMENT '邮箱验证',
  `valid_mobile` tinyint(2) default '0' COMMENT '手机验证',
  `is_first_login` tinyint(1) default '1' COMMENT '首次登录标记',
  `agree_count` int(11) default '0' COMMENT '赞同数量',
  `thanks_count` int(11) default '0' COMMENT '感谢数量',
  `views_count` int(11) default '0' COMMENT '个人主页查看数量',
  `reputation` int(11) default '0' COMMENT '个人威望值',
  `reputation_update_time` int(11) default NULL COMMENT '个人威望值更新时间',
  PRIMARY KEY  (`uid`),
  KEY `user_name` (`user_name`),
  KEY `email` (`email`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

DROP TABLE IF EXISTS `aws_users_attrib`;

CREATE TABLE `aws_users_attrib` (
  `id` int(11) NOT NULL auto_increment COMMENT '自增id',
  `uid` int(11) default NULL COMMENT '用户UID',
  `introduction` varchar(255) default NULL COMMENT '个人简介',
  `signature` varchar(255) default NULL COMMENT '个人签名',
  `qq` int(10) default NULL,
  `msn` varchar(255) default NULL,
  `popular_email` varchar(255) default NULL,
  `homepage` varchar(255) default NULL,
  PRIMARY KEY  (`id`),
  KEY `uid` (`uid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='用户附加属性表';

DROP TABLE IF EXISTS `aws_users_email_setting`;

CREATE TABLE `aws_users_email_setting` (
  `email_setting_id` int(11) NOT NULL auto_increment COMMENT '自增id',
  `uid` int(11) NOT NULL,
  `sender_11` tinyint(4) default NULL COMMENT '有人关注了我',
  `sender_12` tinyint(4) default NULL COMMENT '有人问了我一个问题',
  `sender_13` tinyint(4) default NULL COMMENT '有人邀请我回答一个问题',
  `sender_14` tinyint(4) default NULL COMMENT '我关注的问题有了新答案',
  `sender_15` tinyint(4) default NULL COMMENT '有人向我发送私信',
  PRIMARY KEY  (`email_setting_id`),
  KEY `uid` (`uid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='邮件通知设定';

DROP TABLE IF EXISTS `aws_users_group`;

CREATE TABLE `aws_users_group` (
  `group_id` int(11) NOT NULL auto_increment,
  `type` tinyint(3) default '0' COMMENT '0-会员组 1-系统组',
  `custom` tinyint(1) default '0' COMMENT '是否自定义',
  `group_name` varchar(50) NOT NULL,
  `reputation_lower` int(11) default '0',
  `reputation_higer` int(11) default '0',
  `reputation_factor` float default '0' COMMENT '威望系数',
  `permission` text COMMENT '权限设置',
  PRIMARY KEY  (`group_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='用户组';

DROP TABLE IF EXISTS `aws_users_notification_setting`;

CREATE TABLE `aws_users_notification_setting` (
  `notice_setting_id` int(11) NOT NULL auto_increment COMMENT '自增id',
  `uid` int(11) NOT NULL,
  `data` text COMMENT '设置数据',
  PRIMARY KEY  (`notice_setting_id`),
  KEY `uid` (`uid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='通知设定';

DROP TABLE IF EXISTS `aws_users_online`;

CREATE TABLE `aws_users_online` (
  `online_id` int(11) NOT NULL auto_increment,
  `uid` int(11) NOT NULL COMMENT '用户 ID',
  `last_active` int(10) NOT NULL COMMENT '上次活动时间',
  `ip` bigint(12) NOT NULL COMMENT '客户端 IP',
  `active_url` varchar(255) NOT NULL COMMENT '停留页面',
  `user_agent` varchar(255) NOT NULL COMMENT '用户客户端信息',
  PRIMARY KEY  (`online_id`),
  KEY `uid` (`uid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='在线用户列表';

DROP TABLE IF EXISTS `aws_users_qq`;

CREATE TABLE `aws_users_qq` (
  `id` int(11) unsigned NOT NULL auto_increment,
  `uid` int(11) NOT NULL COMMENT '用户在本地的UID',
  `name` varchar(64) default NULL COMMENT '微博昵称',
  `location` varchar(255) default NULL COMMENT '地址',
  `gender` varchar(8) default NULL,
  `add_time` int(10) default NULL COMMENT '添加时间',
  `access_token` varchar(64) default NULL,
  `oauth_token_secret` varchar(64) default NULL,
  `nick` varchar(64) default NULL,
  PRIMARY KEY  (`id`),
  KEY `uid` (`uid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

DROP TABLE IF EXISTS `aws_users_sina`;

CREATE TABLE `aws_users_sina` (
  `id` int(11) NOT NULL COMMENT '新浪用户ID',
  `uid` int(11) NOT NULL COMMENT '用户在本地的UID',
  `name` varchar(64) default NULL COMMENT '微博昵称',
  `location` varchar(255) default NULL COMMENT '地址',
  `description` text COMMENT '个人描述',
  `url` varchar(255) default NULL COMMENT '用户博客地址',
  `profile_image_url` varchar(255) default NULL COMMENT 'Sina 自定义头像地址',
  `gender` varchar(8) default NULL,
  `add_time` int(10) default NULL COMMENT '添加时间',
  `access_token` varchar(64) default NULL,
  PRIMARY KEY  (`id`),
  UNIQUE KEY `uid` (`uid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

DROP TABLE IF EXISTS `aws_users_ucenter`;

CREATE TABLE `aws_users_ucenter` (
  `id` int(11) unsigned NOT NULL auto_increment,
  `uid` int(11) default '0',
  `uc_uid` int(11) default '0',
  `username` varchar(255) default NULL,
  `email` varchar(255) default NULL,
  PRIMARY KEY  (`id`),
  KEY `uid` (`uid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

DROP TABLE IF EXISTS `aws_work_experience`;

CREATE TABLE `aws_work_experience` (
  `work_id` int(11) unsigned NOT NULL auto_increment COMMENT '自增ID',
  `uid` int(11) default NULL COMMENT '用户ID',
  `start_year` int(11) default NULL COMMENT '开始年份',
  `start_month` int(11) default NULL COMMENT '开始月份',
  `end_year` int(11) default NULL COMMENT '结束年月',
  `end_month` int(11) default NULL COMMENT '结束月份',
  `company_name` varchar(64) default NULL COMMENT '公司名',
  `experience_description` varchar(255) default NULL COMMENT '工作描述',
  `jobs_id` int(11) default NULL COMMENT '职位ID',
  `country` int(11) default NULL COMMENT '国家',
  `province` int(11) default NULL COMMENT '省',
  `city` int(11) default NULL COMMENT '市',
  `district` int(11) default NULL COMMENT '区',
  `add_time` int(10) default NULL COMMENT '添加时间',
  PRIMARY KEY  (`work_id`),
  KEY `uid` (`uid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='工作经历';

